Optimal. Leaf size=39 \[ -\frac {B x}{b}+\frac {(A b+a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {396, 214}
\begin {gather*} \frac {(a B+A b) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}-\frac {B x}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 396
Rubi steps
\begin {align*} \int \frac {A+B x^2}{a-b x^2} \, dx &=-\frac {B x}{b}+\frac {(A b+a B) \int \frac {1}{a-b x^2} \, dx}{b}\\ &=-\frac {B x}{b}+\frac {(A b+a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 39, normalized size = 1.00 \begin {gather*} -\frac {B x}{b}+\frac {(A b+a B) \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 37, normalized size = 0.95
method | result | size |
default | \(-\frac {B x}{b}-\frac {\left (-A b -B a \right ) \arctanh \left (\frac {b x}{\sqrt {a b}}\right )}{b \sqrt {a b}}\) | \(37\) |
risch | \(-\frac {B x}{b}-\frac {\ln \left (b x -\sqrt {a b}\right ) A}{2 \sqrt {a b}}-\frac {\ln \left (b x -\sqrt {a b}\right ) B a}{2 b \sqrt {a b}}+\frac {\ln \left (-b x -\sqrt {a b}\right ) A}{2 \sqrt {a b}}+\frac {\ln \left (-b x -\sqrt {a b}\right ) B a}{2 b \sqrt {a b}}\) | \(99\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 49, normalized size = 1.26 \begin {gather*} -\frac {B x}{b} - \frac {{\left (B a + A b\right )} \log \left (\frac {b x - \sqrt {a b}}{b x + \sqrt {a b}}\right )}{2 \, \sqrt {a b} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.79, size = 98, normalized size = 2.51 \begin {gather*} \left [-\frac {2 \, B a b x - {\left (B a + A b\right )} \sqrt {a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {a b} x + a}{b x^{2} - a}\right )}{2 \, a b^{2}}, -\frac {B a b x + {\left (B a + A b\right )} \sqrt {-a b} \arctan \left (\frac {\sqrt {-a b} x}{a}\right )}{a b^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (34) = 68\).
time = 0.15, size = 75, normalized size = 1.92 \begin {gather*} - \frac {B x}{b} - \frac {\sqrt {\frac {1}{a b^{3}}} \left (A b + B a\right ) \log {\left (- a b \sqrt {\frac {1}{a b^{3}}} + x \right )}}{2} + \frac {\sqrt {\frac {1}{a b^{3}}} \left (A b + B a\right ) \log {\left (a b \sqrt {\frac {1}{a b^{3}}} + x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.03, size = 36, normalized size = 0.92 \begin {gather*} -\frac {B x}{b} - \frac {{\left (B a + A b\right )} \arctan \left (\frac {b x}{\sqrt {-a b}}\right )}{\sqrt {-a b} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 31, normalized size = 0.79 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {b}\,x}{\sqrt {a}}\right )\,\left (A\,b+B\,a\right )}{\sqrt {a}\,b^{3/2}}-\frac {B\,x}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________